home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / utility / ffe101.zip / DATABASE.SWG / 0004_DBF.pas < prev   
Pascal/Delphi Source File  |  1997-02-15  |  2KB  |  68 lines

  1. To: webmaster@wotsit.demon.co.uk
  2. From:    Peter Mikalajunas
  3.  
  4. Your  DBF  description is iffy to say  the  least. I am enclosing a more
  5. accurate  file  layout.  Note it  include  dBaseIII+,  dBaseIV, FoxBase,
  6. FoxPro upto and including 2.6.
  7.  
  8.  
  9. DBF FILE STRUCTURE
  10. ~~~~~~~~~~~~~~~~~~
  11.  
  12. BYTES   DESCRIPTION
  13. 00    FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo - 0x03
  14.         FoxBase+, dBaseIII+ with memo - 0x83
  15.     FoxPro with memo - 0xF5
  16.     dBaseIV with memo - 0x8B
  17.     dBaseIV with SQL Table - 0x8E
  18.  
  19. 01-03   Last update, format YYYYMMDD
  20. 04-07    Number of records in file (32-bit number)
  21. 08-09    Number of bytes in header (16-bit number)
  22. 10-11    Number of bytes in record (16-bit number)
  23. 12-13    Reserved, fill with 0x00
  24. 14    dBaseIV flag, incomplete transaction
  25.         Begin Transaction sets it to 0x01
  26.     End Transaction or RollBack reset it to 0x00
  27.  
  28. 15      Encryption flag, encrypted 0x01 else 0x00
  29.         Changing the flag does not encrypt or decrypt the records
  30.  
  31. 16-27   dBaseIV multi-user environment use
  32. 28    Production index exists - 0x01 else 0x00
  33. 29    dBaseIV language driver ID
  34. 30-31   Reserved fill with 0x00
  35. 32-n    Field Descriptor array
  36. n+1    Header Record Terminator - 0x0D
  37.  
  38. FIELD DESCRIPTOR ARRAY TABLE
  39. BYTES   DESCRIPTION
  40. 0-10    Field Name ASCII padded with 0x00
  41. 11    Field Type Identifier (see table)
  42. 12-15    Displacement of field in record
  43. 16    Field length in bytes
  44. 17    Field decimal places
  45. 18-19    Reserved
  46. 20    dBaseIV work area ID
  47. 21-30    Reserved
  48. 31     Field is part of production index - 0x01 else 0x00
  49.  
  50. FIELD IDENTIFIER TABLE
  51. ASCII   DESCRIPTION
  52. C       Character
  53. D       Date, format YYYYMMDD
  54. F       Floating Point
  55. G       General - FoxPro addition
  56. L       Logical, T:t,F:f,Y:y,N:n,?-not initialized
  57. M       Memo (stored as 10 digits representing the dbt block number)
  58. N       Numeric
  59. P       Picture - FoxPro addition
  60.  
  61. Note all dbf field records begin with a deleted flag field. If record is
  62. deleted  - 0x2A (asterisk) else 0x20 (space)  End of file is marked with
  63. 0x1A
  64.  
  65. Peter Mikalajunas
  66. kd9fb@xnet.com
  67. http://www.xnet.com/~kd9fb
  68.